home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_100
/
121_01
/
fseek.doc
< prev
next >
Wrap
Text File
|
1985-08-19
|
2KB
|
69 lines
FSEEK (2) BDS C Users' Group FSEEK (2)
NAME NAME
fseek - routines required by more
SYNOPSIS SYNOPSIS
fseek fseek()
ftell ftell()
DESCRIPTION DESCRIPTION
_____ Fseek consists of two routines: fseek and ftell. These
provide Unix-like facilities for character seek & positional
query to BDS C programs.
Fseek is called with 3 arguments: filedesc, position, and
code. Filedesc is the I/O buffer pointer, position is an
int saying where we want to be, and code tells how to
interpret position:
0 absolute, characters
1 relative, characters
2 from end, characters
3 absolute, sectors
4 relative, sectors
5 from end, sectors
Ftell is called with one argument, the filedesc (I/O buffer
pointer). It returns the current position in th file.
CAVEATS CAVEATS
This program was tested with v1.50 of the BDS C compiler
under CP/M 2.2. It should work with other versions of BDS C
and CP/M, but has not been tested.
EXAMPLES EXAMPLES
fseek(file,0,0) seeks to the beginning of the file
BUGS BUGS
Codes 2 and 5 for fseek are not implemented although they
exist in Unix V6. The routine returns ERROR if called with
code 2 or 5.
NOTES NOTES
Used in more.c.
-1-
0 absolute, characters
1 relative, characters